<style>
	tr.none_border td{
		border-bottom:0;
	}
</style>
<table style="border:none; width: 100%" class="list">
    <tr class="caption">
    	<td width="15%"><?php echo $this->translator('customer_evaluation_order');?></td>
    	<td width="15%"><?php echo $this->translator('customer_total_amount');?></td>
        <td width="65%"><?php echo $this->translator('customer_evaluation_feedback');?></td>                        
        <td width="5%"><?php echo $this->translator('customer_evaluation_point_col');?></td>
    </tr>
	<?php if($this->numBuyerEval > 0):?>
	    <?php foreach($this->buyerEval as $b_row):?>
	    <?php
	        //$arrOrderInfo = isset($this->arrOrderInfo[$b_row->order_id])?$this->arrOrderInfo[$b_row->order_id]:null;
	        
	
	        /**
	        * Enterprise info
	        **/
	        $enterprise = isset($this->arrEntInfo[$b_row->order_id])?$this->arrEntInfo[$b_row->order_id]:null;
	        if($enterprise){
	        $e_name = ($this->lang == 'vi_VN')?$enterprise['name_vi']:$enterprise['name_en'];
	            $arrRoute = array(
	                'enterprise_id' => $enterprise['id'],
	                'enterprise_name' => Tomato_Utility_String::removeSign($enterprise['name_en'], '-', true),
	            );
	        }
	    ?>
	    
	    <tr <?php if(trim($b_row->buyer_to_seller_feedback)):?>class="none_border"<?php endif;?>>
	    	<td><?php echo $b_row->order_invoice;?></td>
	    	<td><?php echo $b_row->order_total_amount;?> <i><?php echo $b_row->order_total_amount_currency;?></i></td>
	        <td>
	            <a href="<?php echo $this->url($arrRoute,'bizprofile_enterprise_index');?>"><?php echo $e_name;?></a>: <?php echo ($b_row->seller_to_buyer_feedback)?$b_row->seller_to_buyer_feedback:$this->translator('seller_not_evaluated_yet');?>
	        </td>
	        <td align="center"><?php echo ($b_row->seller_to_buyer_evaluation)?$b_row->seller_to_buyer_evaluation:'-';?></td>
	    </tr>
	    <?php if(trim($b_row->buyer_to_seller_feedback)):?>
	    <tr>
	    	<td>&nbsp;</td>
	    	<td>&nbsp;</td>
	        <td><b><?php echo $this->translator('customer_evaluation_answer');?>:</b> <?php echo $b_row->buyer_to_seller_feedback;?></td>
	        <td align="center"><?php echo ($b_row->buyer_to_seller_evaluation)?$b_row->buyer_to_seller_evaluation:'-';?></td>
	    </tr>
	    <?php endif;?>
	    <?php endforeach;?>
	    <?php if($this->paginator->getPages()->pageCount > 1):?>
	    <tr>
	    	<td colspan="6" class="buyer_ajax_paginator">
	    		<?php echo $this->paginator()->slide($this->paginator, $this->paginatorOptions);?>
	    	</td>
	    </tr>	   
	    <?php endif;?>
    <?php else:?>
		<tr>
		    <td colspan="6">
			<?php echo $this->translator('customer_no_evaluation_yet');?>
			</td>
		</tr>
	<?php endif;?>
</table>

<script type="text/javascript">
$(document).ready(function() {
    $('.buyer_ajax_paginator span a').click(function(evt){
        evt.preventDefault();
        href = $(this).attr('href');
        self = this;
        buyerAjax1(self,href);
    });
});

function buyerAjax1(self,url){
    isEnterprise = '<?php echo $this->isEnterprise;?>';

    http = 'http://'+'<?php echo $_SERVER['HTTP_HOST'];?>';
    route = http+url;

    $(self).html('').addClass('t_a_ui_helper_loading');
    jQuery.ajaxq('buyer1', {
        type: 'POST',
        url: route,
        data: { isEnterprise:isEnterprise },
        success: function(html) {
            $(self).html('').removeClass('t_a_ui_helper_loading');
            $('#buyerOutput').html(html);
        }
    });
}
</script>